package com.example.cloudalibabaprovideorder.nacosconfig;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author <a href="mailto:chenxilzx1@gmail.com">theonefx</a>
 */
@RestController
@RefreshScope
public class SampleController {
    @Autowired
    RestTemplate restTemplate;

    @RequestMapping("/user")
    public String simple() {
        return restTemplate.getForObject("http://nacos-payment-provider/user",String.class);
    }
}
